package nl.scalasim
package actors

import nl.scalasim.actors.traits.{SimulationActor, StoppableActor, ProducingActor, ComposedActor}

/**
 * The InfiniteProducer produces goods at a specified speed, and never
 * runs out of resources.  
 *
 * @author Yigal Duppen
 * @since Oct 5, 2010
 */
class InfiniteProducer(val addressBook: AddressBook, override val descriptor: ActorDescriptor, val goods: Goods, val speed: Int)
        extends SimulationActor(descriptor)
                with ProducingActor
                with StoppableActor
{
  def handleAct: PartialFunction[Any, Unit] = {
    case Act => reply(Ack)
  }
  callbacks :+= handleAct

}